#pragma once
#include <string>
#include <sstream>
#include "Exception.h"


template<typename T> void SafeRelease(T& ptr)
{
	if(ptr) ptr->Release();
	ptr = 0;
}

template<typename T> void SafeDelete(T& ptr)
{
	if(ptr) delete ptr;
	ptr = 0;
}

